<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<div class="page">
	<div class="pageContent">
		<form method="post" id="visitInfo" action="${ctx }/crm/visit!save.action" class="pageForm required-validate" onsubmit="return validateCallback(this,navTabAjaxDone);">
			<input type="hidden" name="id" id="id" value="${id}"/>
			<input type="hidden" name="navTabId" value="visitList"/>
			<div class="pageFormContent" layoutH="56">
				<p>
					<label>客户姓名：</label>
					<input name="customerid" id="customeridid"  type="hidden" size="30" value="${customerid}"/>
					<input name="customername"  id="customerName" type="text" size="30" alt="" value="${customername}" readonly="readonly"/>
					<a class="inputButton" href="${ctx}/crm/customer!selectCustomer.action?idInput=customeridid&nameInput=customerName&field=linkman&selectType=radio" target="dialog" rel="selectCustomerDlg" width="800" height="480">选择客户</a>
				</p>
				<p>
					<label>上次拜访时间：</label>
					<input name="occurdate" type="text" value="${occurdate}" size="30" readonly="true"/>
					<a class="inputDateButton" href="#" onClick="WdatePicker({el:'occurdate',dateFmt:'yyyy-MM-dd HH:mm:ss'})">选择</a>
				</p>
				<p>
					<label>上次拜访类型：</label>
					<input name="visittypeid" id="visittypeid" type="hidden" size="30" value="${visittype.id}" />
					<input type="text" name="typeName" id="typeName"  value="${visittype.name}" size="30" readonly="true"/>
					<a class="inputButton" href="${ctx }/common/sys-type-ui!getSysClassUL.action?code=VISIT_TYPE&leafNode=true&idInput=visittypeid&nameInput=typeName&form=visitInfo&dlgID=visitLevelDlgtype&cascadeName=false" target="dialog" rel="visitLevelDlgtype">选择类型</a>
				</p>
				
				<p>
					<label>完成订单：</label>
					<input type="checkbox" class="" name="withoderTmp" id="withoderTmp" value="1" <s:if test="withoder == 1">checked</s:if> />有
					<input type="hidden" class="" name="withoder" id="withoder" value="" />
				</p>
				<div>
				<p class="textareaBar" style="width:600px;">
					<label>上次拜访主题：</label>
					<input name="subject" class="required" type="text" size="50" value="${subject}" />
				</p>
				</div>
				<div>
				<p class="textareaBar" style="width:600px;">
					<label>上次拜访期望值：</label>
					<textarea name="expect" cols="50" rows="3">${expect}</textarea>
				</p>
				</div>
				<div>
				<p  class="textareaBar" style="width:600px;">
					<label>上次拜访结果：</label>
					<textarea name="result" cols="50" rows="3">${result}</textarea>
				</p>
				</div>
				<p  class="textareaBar" style="width:600px;">
					<label>备注：</label>
					<textarea name="note" cols="50" rows="3">${note}</textarea>
				</p>
				<div>
				<p>
					<label>拜访前短信提醒：</label>
					<input type="checkbox" class="" readonly="readonly" name="nextalertTmp" id="nextalertTmp"  value="1" <s:if test="nextalert == 1">checked</s:if> />是
					<input type="hidden" class="" name="nextalert" id="nextalert" value="" />
				</p>
				<p>
					<label>预定拜访时间：</label>
					<input type="text" class=""  name="nextdate"  value="<s:date name="nextdate" format="yyyy-MM-dd HH:mm:ss"/>" size="30" readonly="true"/>
					<a class="inputDateButton" href="#" onClick="WdatePicker({el:'nextdate',dateFmt:'yyyy-MM-dd HH:mm:ss'})">选择</a>
				</p>
				<p>
					<label>拜访人：</label>
					<s:if test="visitorid!=null">
					<input type="hidden" class="" name="visitorid"  value="${visitorid}" size="30" readonly="readonly"/>
					<input type="text" class="" name="visitorname"  value="${visitorname}" size="30" readonly="readonly" />
					</s:if>
					<s:else>
					<input type="hidden" class="" name="visitorid"  value="${currUser.id}" size="30" readonly="readonly"/>
					<input type="text" class="" name="visitorname"  value="${currUser.name}" size="30" readonly="readonly" />
					</s:else>
				</p>
				</div>
			</div>
			
<script type="text/javascript">
	function checkTmp(){
		if($("#withoderTmp").attr('checked')==true){
			document.getElementById("withoder").value = "1";
		}else{
			document.getElementById("withoder").value = "0";
		}
		
		if($("#nextalertTmp").attr('checked')==true){
			document.getElementById("nextalert").value = "1";
		}else{
			document.getElementById("nextalert").value = "0";
		}
	}
</script>
			<div class="formBar">
				<ul>
					<li>
						<div class="button"><div class="buttonContent"><button type="Button" onclick="navTab.closeCurrentTab()">关 闭</button></div></div>
					</li>
				</ul>
			</div>
		</form>
	</div>
</div>